home *** CD-ROM | disk | FTP | other *** search
- Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!gatech!howland.reston.ans.net!noc.near.net!nic.umass.edu!ymir.cs.umass.edu!ymir.cs.umass.edu!usenet
- From: walsh@cs.umass.edu (Norman Walsh)
- Newsgroups: comp.fonts,comp.answers,news.answers
- Subject: comp.fonts FAQ.7.NeXT-Info
- Followup-To: poster
- Date: 21 Jun 1993 13:19:18 GMT
- Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
- Lines: 402
- Approved: news-answers-request@MIT.Edu
- Distribution: world
- Expires: 21 Jul 93 09:21:06 GMT
- Message-ID: <fonts-faq-9-740668866@cs.umass.edu>
- References: <fonts-faq-1-740668866@cs.umass.edu>
- Reply-To: walsh@cs.umass.edu (Norman Walsh)
- NNTP-Posting-Host: ibis.cs.umass.edu
- Summary: This posting answers frequently asked questions about fonts.
- It addresses both general font questions and questions that
- are specific to a particular platform.
- Xref: senator-bedfellow.mit.edu comp.fonts:9147 comp.answers:1075 news.answers:9624
-
- Posted-By: auto-faq 2.4
- Archive-name: fonts-faq/part9
- Version: 1.4.1
-
- Subject: Chapter 7
-
- NeXT Information
-
- Subject: 7.1. Please help!
-
- If you have any suggestions for this section, please forward your
- suggestions to norm.
-
- Subject: 7.2. Tell me about NeXT fonts
-
- NeXT fonts are Adobe Type 1 fonts stored in ASCII (PFA) format.
- There are several rules about how fonts must be installed before
- they work.
-
- * Basic format
-
- The font itself should be a directory under /Library/Fonts (or
- /LocalLibrary/Fonts or /NextLibrary/Fonts), which should contain
- the various components of the font. The possible components are
- the outline file, the font metrics (.afm) file, and one or more
- screen font (bitmap) files.
-
- At the very least, the font directory must contain the outline
- file and the .afm file. Screen font (bitmap) files are optional.
-
- * Filename requirement
-
- The filename of the font can NOT be any name you choose. For a
- font to work correctly, the base filename MUST BE THE SAME as the
- name in the FontName field of the afm file (and outline file, for
- that matter).
-
- Therefore, the font directory should be named <filename>.font,
- inside of which there should be at least two files:
- <filename>.afm, the font metrics file, and <filename> (no
- extension), the outline file. The bitmap file(s) have the
- extension .bepf.
-
- Variations such as bold, italic, etc., should be their own font
- in their own directory. The <filename> in the examples above
- should be replaced by <filename>-Bold, or <filename>-Italic, etc.
- (Make sure the entries in the .afm and outline files reflect
- this.)
-
- For NeXTStep 1.0, you also need to take the following steps:
-
- * If they do not already exist, create the following
- directories:
-
- ~/Library/Fonts/outline
- ~/Library/Fonts/afm
- ~/Library/Fonts/bitmap
-
- * In each of these directories, create a symbolic link to the
- corresponding component file in each font.
-
- In NeXTStep 2.0 and up, the font description is taken from the
- font directory itself, so you don't need to do this. It may be
- beneficial to simply create these directories and put nothing in
- them, but I'm not sure it matters.
-
- The last step is to get the system to recognize the new font(s).
- You may have noticed the existence of three files in the Fonts
- directory - .fontdirectory, .fontlist, and .afmcache. These are
- the files the system looks at to see which fonts exist.
-
- The easiest way to update them is to simply start up an
- application and open the font panel. It should recognize that the
- update time stamp on the Fonts directory has changed, and update
- the files accordingly. It is probably a good idea to simply
- delete the three above files beforehand.
-
- You should get a message window saying "incorporating information
- on new fonts. Please wait (this may take xx seconds)". Your new
- fonts should be available now.
-
- If this does not work, you can update them manually. Open up a
- Terminal shell and go to your Fonts directory. At the prompt,
- type two commands:
-
- buildafmdir
- cacheAFMData afm (the parameter is the <afm dir>)
-
- (The new fonts will not work if the cacheAFMData command is not
- run, and since it is an undocumented command, it is a common
- culprit.) [ ed: the cacheAFMData step may not be required in 3.0
- OS ]
-
- You should now be able to see and preview your fonts in the font
- panel.
-
- If you are still having problems with your font, such as the <<
- Unusable font >> message, consult the NeXTAnswers. There are some
- useful suggestions for debugging faulty fonts there. It is also
- always helpful to look at existing fonts to see how they are
- installed.
-
- (One note on the NeXTAnswers. Supposedly there are only a few
- discrete values which are allowed to appear in the weight field
- of the font: ``Ultra Light'', ``Thin'', ``Light'', ``Extra
- Light'', ``Book'', ``Regular'', ``Plain'', ``Roman'', ``Medium'',
- ``Demi'', ``Demi-Bold'', ``Semi-Bold'', ``Bold'', ``Extra Bold'',
- ``Heavy'', ``Heavyface'', ``Black'', ``Ultra'', ``UltraBlack'',
- ``Fat'', ``ExtraBlack'', and ``Obese''. However, I have a few
- fonts where this is not the case (``standard'' is a common entry)
- and have had no problems as of yet. But it would probably be
- wiser to be on the safe side.)
-
- Subject: 7.3. Tell me more about NeXT fonts
-
- * About NeXT fonts
-
- Every NeXT font is placed in its own .font folder which should
- contain at least two files. An outline file which should be named
- the same as folder but without any extension. Also a
- well-formated .afm is required. E.g
-
- ~/Library/Fonts/Headhunter.font/Headhunter
- ~/Library/Fonts/Headhunter.font/Headhunter.afm
-
- is the minimal setup for Headhunter font.
-
- The outline files should be in the PFA or hexadecimal ASCII
- format. The fontname is should be taken either from outline file
- or the AFM file. In both case the name is given after the word
- ``FontName'' at the beginning of the file)
-
- * Converted fonts after the conversion
-
- After conversion they are just like any other freeware or
- shareware font that you can get in the NeXT-format from the
- archives. That's just outline and afm files but no bitmapped
- screen fonts. So small point size means poor resolution on screen
- but they most of should print ok if they are any good ( = usually
- made with Fontographer).
-
- * About conversion utilities
-
- I usually first convert the Mac Type 1 (or 3) fonts to PC format
- which is a lot closer to NeXT format and then convert the
- PC(Windows PFB) fonts to NeXT-format. Instructions for converting
- from Mac to PC format appear elsewhere in the comp.fonts FAQ.
-
- * NeXT utilities
-
- * unfont
-
- You can find a package, named something like
- pcATMfont2NeXT.tar.Z, from NeXT archives (cs.orst.edu) that
- converts PC fonts to NeXT format (PFB -> PFA).
-
- The most useful tool for me has been ``unfont'' which converts
- the .pfb (binary outline) font to ASCII outline font.
-
- I usually use it like this
-
- $ unfont new_font.pfb >NewFont
-
- If the conversion was successful all I have to after that is
- maybe to rename the font correctly and move the outline file
- in the correct .font folder.
-
- * Opener.app
-
- Opener seems to be a very useful application since it can open
- several kinds file packages on NeXT that are common on other
- platforms. E.g. ``.sit", ".hqx", ".zoo", ".zip", ".z'', etc.
-
- I haven't used it a lot but looks very promising.
-
- * T1utils-1.1
-
- This is collection of command-line programs that manipulate PS
- Type 1 fonts and one of them can also do the PFB->PFA
- conversion (t1ascii?).
-
- * SUMMARY
-
- Basic unarchiving of Mac and PC files
-
- On any (?) Unix including NeXT
- ------------------------------
-
- Tool Conversion Follow-up action
-
- xbin .hqx -> .data rename and transfer to a PC (or use opener.app on NeXT?)
- .info discard
- .rcrc discard
-
- unzip .zip -> .inf discard
- .wfn discard
- .pfm discard (unless it can generate a better .afm)
- <rest> Transfer to NeXT
-
- On a PC
- -------
-
- Tool Conversion Follow-up action
-
- xbin .hqx -> .data rename the file to .sit or .cpt accordingly if necessary
- .info discard
- .rcrc discard
-
- extract -f ... .cpt -> (outline files usually don't have extensions),
- refont and transfer to NeXT
- .afm transfer to NeXT
- .pfm discard (unless it can generate a better .afm)
- .bma discard if you have .afm
-
- unsit30 -eb .sit -> (outline files usually don't have extensions),
- refont and transfer to NeXT
- .afm transfer to NeXT
- .pfm discard (unless it can generate a better .afm)
- .bma discard if you have .afm
-
- refont (Mac outline) -> (PC or NeXT outline) Transfer to NeXT
-
- pkunzip .zip -> .inf discard
- .wfn discard
- .pfm discard (unless it can generate a better .afm)
- <rest> Transfer to NeXT
-
- On a NeXT
- ---------
- Tool Conversion
-
- Opener.app *.sit, *.hqx, *.zip... Creates a fo|der in the /tmp from where
- the resulting files can be moved elsewhere.
-
- unfont .pfb -> (outline font without an extension)
-
- afm .afm -> .afm converts the the carriage-returns to newlines,
- (afm = "tr '\015' '\012' <$1 >$2")
-
- * Installation
-
- There are scripts (installfont) available that can handle the
- installation process but here is how you do it manually.
-
- * .font
-
- After all that you have to create the .font folder, move the
- outline and .afm files there and start fighting with the
- strangely formated .afm file. The most common problems are font
- name mismatch between outline and afm files (family name is
- incorrect or too long, etc) and missing fields (ex. no
- ItalicAngle entry) in the afm file.
-
- * buildafmdir AND cacheAFMData
-
- buildafmdir puts its complains to Console but cacheAFMData put
- them on stdout or stderr (ie. Terminal Window).
-
- PARSE ERRORS ------------ ``Parse error 10000011 ...'' comes from
- mismatch between of CharMetrics declared in the .afm and actually
- found. I haven't been able to figure out the other strange parse
- errors.
-
- buildafmdir in the 3.0 release has the limitation of not being
- able to install more that 255 fonts (in one folder ?).
-
- Subject: 7.4. Porting fonts to the NeXT
-
- 7.4.1. Porting PC/Unix Type 1 Fonts
-
- You must have the .pfb and .afm files
-
- A PC Adobe font is stored in binary format, so the first step is to
- convert it to ascii.
-
- There are a couple of utilities out there which can do this. I
- think t1utils can do it, and there is a nice utility called
- pcATMfont2Next which has a couple of tools to do this (unfont and
- pfb2ps). Look for the file pcATMfont2Next.tar.Z; it is available on
- many ftp sites.
-
- Also, since NeXTs run on Unix, there is the customary problem of
- converting the CRs (carriage returns) that PCs use to the LFs
- (Linefeeds) that Unix uses. The easiest way to do this is to use tr
- to delete the octal for the CR character from both the .afm and
- outline file. The command to do this is:
-
- tr -d '\015' < inputfile > outputfile
-
- The unfont program will do this automatically when it converts the
- .pfb file, but pfb2ps does not. I'm not sure if t1utils' utility
- does or not.
-
- Once you have the outline file, you can go ahead and install it by
- the process outlined above.
-
- Otto J. Makela (otto@jyu.fi) posted a terrific cshell script to
- comp.fonts, which automates just about everything for you. It
- converts the .pfb to ASCII format, extracts the name from the
- FontName field, creates the font directory, copies in the component
- files with the correct name, and runs buildafmdir and cacheAFMData
- when done.
-
- Note that it uses the unfont utility from the pcATMfont2Next
- package, so to use this you will need that too.
-
- Just take everything between the CUT HERE lines, save it into a
- text file, and make it executable with the chmod command or the
- Inspector.
-
- --------------CUT HERE---------------
- #!/bin/csh -f
- # Font install program -- 1992 by Otto J. Makela <otto@jyu.fi>
-
- set progname="$0" todir=~/Library/Fonts
- set progname="$progname:t"
-
- if ( $#argv>0 && -d "$1" ) then
-
- set todir="$1"
- shift
- endif
-
- if ( $#argv == 0 ) then
- echo "usage: $progname [installdir] afmfile..."
- exit
- endif
-
- foreach afmfile ( $* )
-
- echo "${afmfile}:"
- set fontname=`tr -d '\015' < $afmfile | awk '$1=="FontName" {
- print $2 } '`
-
- if ( -d $todir/${fontname}.font ) then
- echo "${progname}: font $fontname already installed"
- continue
- endif
-
- # If there already is a pfa, no need to translate, otherwise convert
- to ascii
- if ( -f ${afmfile:r}.pfa ) then
- mkdir ${todir}/${fontname}.font
-
- cp ${afmfile:r}.pfa
- ${todir}/${fontname}.font/${fontname}
- else if ( -f ${afmfile:r}.pfb ) then
- mkdir ${todir}/${fontname}.font
- unfont ${afmfile:r}.pfb >
- ${todir}/${fontname}.font/${fontname}
- else
- echo "${progname}: no pfa/pfb file for $fontname afm"
- continue
- endif
- # Strip CR's from afm file
- tr -d '\015' < $afmfile >
- ${todir}/${fontname}.font/${fontname}.afm
-
- echo "installed as $fontname"
- end
-
- buildafmdir $todir
- cacheAFMData $todir
-
- ---------------CUT HERE-----------
-
- The original installfont script is available as a shar file from
- ibis.cs.umas.edu in /pub/norm/comp.fonts/installfont-for-NeXT.
-
- 7.4.2. Porting Mac Type 1 Fonts
-
- Regarding this section: Henry McGilton of Trilithon Systems has
- built a `MACtoPFA' utility that runs on the NeXT and converts Mac
- to NeXT format. Trilithon Software, Two Ohlone, Portola Valeey, CA
- 94028 (415) 851 7233.
-
- Subject: 7.5. Font availability
-
- Public Domain fonts for the NeXT are available via anonymous FTP
- from sonata.purdue.edu, in the directory next/graphics/fonts. The
- README for this file states that the directory is currently being
- restructured by the archive moderator, although fonts are still
- available in that directory.
-
- Subject: 7.6. Why can I only install 256 fonts on my NeXT?
-
- Included to NS3.0 there's a new 'buildafm'-routine (for
- non-NeXTers: 'buildafm' is a shell script which announces a new
- font to the computer) at /usr/bin/buildafmdir. The new one only
- allows to install about 256 fonts. Running the new 'buildafmdir' to
- install a new font surpresses every font above this number.
- Workaround: Re-install the 'old buildafmdir' from NS2.1 at
- /usr/bin/buildafmdir and everything should be fine!
-
- (thanks to: Rob Parkhill <rob@hobbes.cuc.ab.ca> and d'Art
- Computers/Germany d'art <post@dart.de>)
-
- [ Ed: and my thanks to Borris Balzer <borris@boba.rhein-main.DE>
- for sending this to me ]
-
-
-
-